package com.openvas.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openvas.mapper.TableTargetMapper;
import com.openvas.domain.TableTarget;
import com.openvas.service.ITableTargetService;
import com.openvas.commons.common.core.text.Convert;

/**
 * 目标Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
@Service
public class TableTargetServiceImpl implements ITableTargetService 
{
    @Autowired
    private TableTargetMapper tableTargetMapper;

    /**
     * 查询目标
     * 
     * @param id 目标主键
     * @return 目标
     */
    @Override
    public TableTarget selectTableTargetById(Long id)
    {
        return tableTargetMapper.selectTableTargetById(id);
    }

    /**
     * 查询目标列表
     * 
     * @param tableTarget 目标
     * @return 目标
     */
    @Override
    public List<TableTarget> selectTableTargetList(TableTarget tableTarget)
    {
        return tableTargetMapper.selectTableTargetList(tableTarget);
    }

    /**
     * 新增目标
     * 
     * @param tableTarget 目标
     * @return 结果
     */
    @Override
    public int insertTableTarget(TableTarget tableTarget)
    {
        return tableTargetMapper.insertTableTarget(tableTarget);
    }

    /**
     * 修改目标
     * 
     * @param tableTarget 目标
     * @return 结果
     */
    @Override
    public int updateTableTarget(TableTarget tableTarget)
    {
        return tableTargetMapper.updateTableTarget(tableTarget);
    }

    /**
     * 批量删除目标
     * 
     * @param ids 需要删除的目标主键
     * @return 结果
     */
    @Override
    public int deleteTableTargetByIds(String ids)
    {
        return tableTargetMapper.deleteTableTargetByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除目标信息
     * 
     * @param id 目标主键
     * @return 结果
     */
    @Override
    public int deleteTableTargetById(Long id)
    {
        return tableTargetMapper.deleteTableTargetById(id);
    }
}
